﻿using System;
using System.Collections.Generic;

namespace RIT_CS
{
    public class Range
    {
        private readonly int limit;

        public Range(int limit)
        {
            this.limit = limit;
        }

        public IEnumerator<int> GetEnumerator()
        {
            for (int i = 0; i < limit; i++)
                yield return i;
            yield break;
        }

        public static void Main()
        {
            foreach (int n in new Range(8))
                Console.Write(n + " ");
            Console.WriteLine();
        }
    }
}
